<template>
  <el-container class="PHome">
    <el-aside width="200px">
      <el-menu 
      :router="true"
      active-text-color="#9dd88e"
      :default-active="fromMessage">
        <el-menu-item index="1" :route="{
          name:'BasicMessage',
          params:{from:'1'}
        }">
          <span slot="title">基本资料</span>
        </el-menu-item>
        <el-menu-item index="2" :route="{
          name:'HeadSet',
          params:{from:'2'}
        }">
          <span slot="title">头像设置</span>
        </el-menu-item>
        <el-menu-item index="3" :route="{
          name:'ChangePassword',
          params:{from:'3'}
        }">
          <span slot="title">密码修改</span>
        </el-menu-item>
        <el-menu-item index="4" :route="{
          name:'YI',
          params:{from:'4'}
        }">
          <span slot="title">俳语</span>
        </el-menu-item>
      </el-menu>
    </el-aside>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</template>

<script>
export default {
    name:'PHome',
    data() {
      return {
      };
    },
    mounted(){
      this.$router.replace({
        name:'BasicMessage'
      })
    },
    computed: {
      fromMessage() {
          return this.$route.params.from || `1`
      },
    }
}
</script>

<style lang="less" >
  .PHome{
    height: 600px;
    padding: 0px;
    .el-aside{
      .el-menu{
        &>li>span{
          font-family: 'FZZYJT';
          font-size: 16px;
          user-select: none;
        }
      }
    }
    .el-main{
      position: relative;
    }
  }
</style>